<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <h1>今天的励志话语是：</h1>
    <script>
        // fetch返回的是一个promise对象
        fetch("https://api.vvhan.com/api/en").then(res=>
        // 第一次调用.then将结果通过.json()保留
            res.json()
        ).then(res=>{
            // console.log(res);
            document.querySelector('h1').innerHTML = res.data.zh
        })
    </script>
    </script>
</body>
</html>